/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.foxline.model;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.*;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;

/**
 *
 * @author roniere
 */
@Entity
public class TypeLot implements Serializable{
    
    @Id
    @SequenceGenerator(sequenceName = "seq_typelot", name = "seq_typelot", allocationSize = 1)
    @GeneratedValue(generator = "seq_typelot", strategy = GenerationType.SEQUENCE)
    private Long id;
    
    private String name;
    
    @Column(scale= 2, precision=10)
    @DecimalMin( value = "0.00" )
    @Digits( fraction = 2, integer = 10 )
    private BigDecimal value;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getValue() {
        return value;
    }

    public void setValue(BigDecimal value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return "TypeLot{" + "id=" + id + ", name=" + name + ", value=" + value + '}';
    }
    
    
    
}
